package com.fingard.dsp.web.page.d;

import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.HashMap;

import com.fingard.FGBiz;
import com.fingard.common.utils.json.JSONUtils;
import com.fingard.dsp.web.page.PageBase;

public class GetLimitLogDetail extends PageBase {
    @Override
    public void pageLoad() throws Exception {
        StringBuilder respSb = new StringBuilder();
        String xxx = httpContext.request.httpReceiver.getRawReqStr();
        String reqJson = httpContext.request.httpReceiver.getReqBodyContent();
        HashMap<String, String> reqParams = JSONUtils.json2Map(reqJson);
        String getKey = reqParams.get("key");
        getKey = URLDecoder.decode(getKey, httpContext.request.httpReceiver.getCharset());
        ArrayList<String> valList = FGBiz.limitMsg.getLimitDetail(getKey);
        for (int i = 0; i < valList.size(); i++) {
            if (i > 0) {
                respSb.append("\r\n\r\n");
            }
            respSb.append(valList.get(i));
        }

        httpContext.response.respMsg = respSb.toString();
    }
}
